<?php
class user_1 extends Update_Model_Database_AbstractChange{

	protected $comment="Создание таблицы user";

	public function up(){
		$sql='CREATE TABLE IF NOT EXISTS user(
  				id INT(11) NOT NULL AUTO_INCREMENT,
  				login TEXT NOT NULL,
  				pass TEXT NOT NULL,
  				role TEXT NOT NULL,
  				email TEXT DEFAULT NULL,
  				new_pass_hash TEXT DEFAULT NULL,
  				new_pass TEXT DEFAULT NULL,
  				name TEXT DEFAULT NULL,
				property text DEFAULT NULL,
  				PRIMARY KEY (id)
			)
				ENGINE = INNODB
				CHARACTER SET utf8
				COLLATE utf8_general_ci;';
		$this->db->query($sql);
	}

	public function down(){
		$sql='DROP TABLE IF EXISTS user;';
		$this->db->query($sql);
	}

}